<?php
/**
 * FCJ database library
 *
 *
 * Provides some FCJ database facilities
 * @package FCJ\Database
 *
 *
 * @author Felipe
 */
namespace FCJ\Database;

/**
 * Namespace for PHP Util Database library
 *
*/
use php_Util\DB as ns_php_Util_DB;


use php_Util as ns_php_Util;

/**
 * Namespace for Database library
 *
 */
use FCJ\Database as ns_FCJ_Database;


/**
 *  Provides some FCJ database facilities
 *
 */
class FCJ_DB_FACTORY {
	
	/**
	 * Returns connection
	 * @return \php_Util\DB\php_Util_DB_CONNECTION
	 */
	public static function get_Connection() {
		
		// Set database connection ---------------------------------------------------------------------|\/|---
		$fcj_DB_Connection = ns_php_Util\DB\php_Util_DB_FACTORY::get_NEW__php_Util_DB_Connection();
		
		$fcj_DB_Connection->type = ns_php_Util\DB\php_Util_DB_CONSTANTS::DB_CONNECTION_TYPE__PDO;
		$fcj_DB_Connection->hostName = "localhost";
		
		$fcj_DB_Connection->default_DB = "fcj_db";
		$fcj_DB_Connection->userName = "fcj_user";
		$fcj_DB_Connection->password = "fcj_password";
		
		$fcj_DB_Connection->options = array(
				\PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION,
				\PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"
		);
		// ---------------------------------------------------------------------------------------------|/\|---
		
		
		return $fcj_DB_Connection;
		
	}
	
}

